import Layout from '@/layout'

const cmsRouter = {
  path: '/cms',
  component: Layout,
  redirect: '/cms/content',
  name: 'Cms',
  meta: {
    title: '内容管理',
    icon: 'documentation'
  },
  hidden: true,
  children: [
    {
      path: 'content',
      component: () => import('@/views/cms/content/index'),
      name: 'Content',
      meta: { title: '文章管理', icon: 'list' }
    },
    {
      path: 'content/add',
      component: () => import('@/views/cms/content/add'),
      name: 'ContentAdd',
      meta: { title: '新增文章', icon: 'edit', activeMenu: '/cms/content' },
      hidden: true
    },
    {
      path: 'content/edit/:id(\\d+)',
      component: () => import('@/views/cms/content/editPage'),
      name: 'ContentEdit',
      meta: { title: '编辑文章', icon: 'edit', activeMenu: '/cms/content' },
      hidden: true
    },

    {
      path: 'action',
      component: () => import('@/views/cms/loop-action/index'),
      name: 'Action',
      meta: { title: '轮播管理', icon: 'list' }
    },

    {
      path: 'language',
      component: () => import('@/views/cms/language/index'),
      name: 'Language',
      meta: { title: '语言管理', icon: 'list' }
    },
    {
      path: 'link',
      component: () => import('@/views/cms/link/index'),
      name: 'Link',
      meta: { title: '友情链接', icon: 'list' }
    },
     {
      path: 'sitemap',
      component: () => import('@/views/cms/sitemap/index'),
      name: 'Sitemap',
      meta: { title: '站点配置', icon: 'list' }
    },
    {
      path: 'feedback',
      component: () => import('@/views/cms/feedback/index'),
      name: 'Feedback',
      meta: { title: '在线留言', icon: 'list' }
    },
  ]
}

export default cmsRouter
